package com.ccp.dev.workflow.model.bpm;

import java.util.Date;
import java.util.Objects;
import java.util.Set;

/**
 * 流程任务的替代类，用于直接操作数据库表
 * @author jia
 */
public class ProcessTask {
    protected String id;
    protected String revision;
    protected String name;
    protected String parentTaskId;
    protected String description;
    protected int priority;
    protected Date createTime;
    protected String owner;
    protected String assignee;
    protected String assigneeName;
    protected Set<TaskExecutor> assignees;
    protected String delegationState;
    protected String executionId;
    protected String processInstanceId;
    protected String processDefinitionId;
    protected String taskDefinitionKey;
    protected String dueDate;
    protected String subject;
    protected String processName;
    protected String allowDivert;
    protected String isCheck;
    protected String defId;
    protected String runId;
    protected String allowBatchApprove;
    protected String typeId;
    protected String typeName;
    protected String orgName;
    protected String tagIds;
    protected String creatorId;
    protected String creator;
    protected String taskStatus;
    protected String endCreateTime;
    protected String globalFlowNo;
    protected String nodePath;
    protected String hasRead;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentTaskId() {
        return parentTaskId;
    }

    public void setParentTaskId(String parentTaskId) {
        this.parentTaskId = parentTaskId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public String getAssigneeName() {
        return assigneeName;
    }

    public void setAssigneeName(String assigneeName) {
        this.assigneeName = assigneeName;
    }

    public Set<TaskExecutor> getAssignees() {
        return assignees;
    }

    public void setAssignees(Set<TaskExecutor> assignees) {
        this.assignees = assignees;
    }

    public String getDelegationState() {
        return delegationState;
    }

    public void setDelegationState(String delegationState) {
        this.delegationState = delegationState;
    }

    public String getExecutionId() {
        return executionId;
    }

    public void setExecutionId(String executionId) {
        this.executionId = executionId;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getProcessDefinitionId() {
        return processDefinitionId;
    }

    public void setProcessDefinitionId(String processDefinitionId) {
        this.processDefinitionId = processDefinitionId;
    }

    public String getTaskDefinitionKey() {
        return taskDefinitionKey;
    }

    public void setTaskDefinitionKey(String taskDefinitionKey) {
        this.taskDefinitionKey = taskDefinitionKey;
    }

    public String getDueDate() {
        return dueDate;
    }

    public void setDueDate(String dueDate) {
        this.dueDate = dueDate;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName;
    }

    public String getAllowDivert() {
        return allowDivert;
    }

    public void setAllowDivert(String allowDivert) {
        this.allowDivert = allowDivert;
    }

    public String getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(String isCheck) {
        this.isCheck = isCheck;
    }

    public String getDefId() {
        return defId;
    }

    public void setDefId(String defId) {
        this.defId = defId;
    }

    public String getRunId() {
        return runId;
    }

    public void setRunId(String runId) {
        this.runId = runId;
    }

    public String getAllowBatchApprove() {
        return allowBatchApprove;
    }

    public void setAllowBatchApprove(String allowBatchApprove) {
        this.allowBatchApprove = allowBatchApprove;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getTagIds() {
        return tagIds;
    }

    public void setTagIds(String tagIds) {
        this.tagIds = tagIds;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }

    public String getEndCreateTime() {
        return endCreateTime;
    }

    public void setEndCreateTime(String endCreateTime) {
        this.endCreateTime = endCreateTime;
    }

    public String getGlobalFlowNo() {
        return globalFlowNo;
    }

    public void setGlobalFlowNo(String globalFlowNo) {
        this.globalFlowNo = globalFlowNo;
    }

    public String getNodePath() {
        return nodePath;
    }

    public void setNodePath(String nodePath) {
        this.nodePath = nodePath;
    }

    public String getHasRead() {
        return hasRead;
    }

    public void setHasRead(String hasRead) {
        this.hasRead = hasRead;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ProcessTask that = (ProcessTask) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(revision, that.revision) &&
                Objects.equals(name, that.name) &&
                Objects.equals(parentTaskId, that.parentTaskId) &&
                Objects.equals(description, that.description) &&
                Objects.equals(priority, that.priority) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(owner, that.owner) &&
                Objects.equals(assignee, that.assignee) &&
                Objects.equals(assigneeName, that.assigneeName) &&
                Objects.equals(assignees, that.assignees) &&
                Objects.equals(delegationState, that.delegationState) &&
                Objects.equals(executionId, that.executionId) &&
                Objects.equals(processInstanceId, that.processInstanceId) &&
                Objects.equals(processDefinitionId, that.processDefinitionId) &&
                Objects.equals(taskDefinitionKey, that.taskDefinitionKey) &&
                Objects.equals(dueDate, that.dueDate) &&
                Objects.equals(subject, that.subject) &&
                Objects.equals(processName, that.processName) &&
                Objects.equals(allowDivert, that.allowDivert) &&
                Objects.equals(isCheck, that.isCheck) &&
                Objects.equals(defId, that.defId) &&
                Objects.equals(runId, that.runId) &&
                Objects.equals(allowBatchApprove, that.allowBatchApprove) &&
                Objects.equals(typeId, that.typeId) &&
                Objects.equals(typeName, that.typeName) &&
                Objects.equals(orgName, that.orgName) &&
                Objects.equals(tagIds, that.tagIds) &&
                Objects.equals(creatorId, that.creatorId) &&
                Objects.equals(creator, that.creator) &&
                Objects.equals(taskStatus, that.taskStatus) &&
                Objects.equals(endCreateTime, that.endCreateTime) &&
                Objects.equals(globalFlowNo, that.globalFlowNo) &&
                Objects.equals(nodePath, that.nodePath) &&
                Objects.equals(hasRead, that.hasRead);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, revision, name, parentTaskId, description, priority, createTime, owner, assignee,assigneeName, assignees, delegationState, executionId, processInstanceId, processDefinitionId, taskDefinitionKey, dueDate, subject, processName, allowDivert, isCheck, defId, runId, allowBatchApprove, typeId, typeName, orgName, tagIds, creatorId, creator, taskStatus, endCreateTime, globalFlowNo, nodePath, hasRead);
    }

    @Override
    public String toString() {
        return "ProcessTask{" +
                "id='" + id + '\'' +
                ", revision='" + revision + '\'' +
                ", name='" + name + '\'' +
                ", parentTaskId='" + parentTaskId + '\'' +
                ", description='" + description + '\'' +
                ", priority='" + priority + '\'' +
                ", createTime='" + createTime + '\'' +
                ", owner='" + owner + '\'' +
                ", assignee='" + assignee + '\'' +
                ", assigneeName='" + assigneeName + '\'' +
                ", assignees='" + assignees + '\'' +
                ", delegationState='" + delegationState + '\'' +
                ", executionId='" + executionId + '\'' +
                ", processInstanceId='" + processInstanceId + '\'' +
                ", processDefinitionId='" + processDefinitionId + '\'' +
                ", taskDefinitionKey='" + taskDefinitionKey + '\'' +
                ", dueDate='" + dueDate + '\'' +
                ", subject='" + subject + '\'' +
                ", processName='" + processName + '\'' +
                ", allowDivert='" + allowDivert + '\'' +
                ", isCheck='" + isCheck + '\'' +
                ", defId='" + defId + '\'' +
                ", runId='" + runId + '\'' +
                ", allowBatchApprove='" + allowBatchApprove + '\'' +
                ", typeId='" + typeId + '\'' +
                ", typeName='" + typeName + '\'' +
                ", orgName='" + orgName + '\'' +
                ", tagIds='" + tagIds + '\'' +
                ", creatorId='" + creatorId + '\'' +
                ", creator='" + creator + '\'' +
                ", taskStatus='" + taskStatus + '\'' +
                ", endCreateTime='" + endCreateTime + '\'' +
                ", globalFlowNo='" + globalFlowNo + '\'' +
                ", nodePath='" + nodePath + '\'' +
                ", hasRead='" + hasRead + '\'' +
                '}';
    }
}